Having a memory is not a necessary nor a sufficient condition for possessing a self-identity. Watch https://www.youtube.com/watch?v=E1TudmLThyA (No Identity Without Memory).
It would seem that we accept that someone has a self-identity if:
(a) He has the same hardware as we do (notably, a brain) and, by implication, the same software as we do (an all-pervasive, omnipresent self-identity) and
(b) He communicates his humanly recognizable and comprehensible inner world to us and manipulates his environment.
We accept that he has a specific (i.e., the same continuous) self-identity if
(c) He shows consistent intentional (i.e., willed) patterns ("memory") in doing (b) for a long period of time.
It seems that we accept that we have a specific self-identity (i.e., we are self-conscious of a specific identity) if
(a) We discern (usually through memory and introspection) long term consistent intentional (i.e., willed) patterns ("memory") in our manipulation ("relating to") of our environment and
(b) Others accept that we have a specific self-identity.
Find and Buy MOST of my BOOKS and eBOOKS in my Amazon Store: https://www.amazon.com/stores/page/60F8EC8A-5812-4007-9F2C-DFA02EA713B3